
import {ToastController} from "ionic-angular";
import {Injectable} from "@angular/core";

@Injectable()
export class ToastService{

  public static NEVER_DURATION = 0;
  public static SHORT_DURATION = 500;
  public static MIDDLE_DURATION = 1500;
  public static LONG_DURATION = 3000;


  constructor(private toastCtrl:ToastController){
  }
  // public static makeToast(mess:string,time:number) {
  //   let toast = ToastService.toastCtrl.create({
  //     message: mess,
  //     duration: time
  //   });
  //   toast.present();
  // }
  public makeToast(mess:string,time){
    let toast = this.toastCtrl.create({
      message:mess,
      duration:time
    });
    toast.present();
  }
}
